package com.campusnews.mapper;

import com.campusnews.pojo.Invitation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lqc
 * @since 2021-09-26
 */
@Repository
public interface InvitationMapper extends BaseMapper<Invitation> {
    @Select("SELECT DAY(create_time),count(DAY(create_time)) from invitation where create_time >DATE_SUB(now(), INTERVAL 6 DAY) and create_time<= now() GROUP BY DAY(create_time);")
    List<Map<String,Object>> getSevenDayInviteNum();
}
